package com.taxsystem.chengwenzhi.branch_map;

import java.util.HashMap;

public class Branch {
	
	private Integer id = null;
	private String name = null;
	private String address = null;
	private String longitude = null;
	private String latitude = null;

	public Branch(Integer id,String name,String address,String longitude,String latitude) {
		this.id = id;
		this.name = name;
		this.address = address;
		this.longitude = longitude;
		this.latitude = latitude;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	/**
	 * 将一个Branch实例转换为HashMap&lt;String,String&gt<br>
	 * 为了方便使用，把经纬度合并成新的key为XY的一个项，<br>你可以通过
	 * get("XY")直接获得分局的经纬度字符串
	 * @return
	 * HashMap&lt;String,String&gt;
	 */
	public HashMap<String,String> toSSMap(){
		HashMap<String,String> map = new HashMap<String, String>();
		map.put("name", name);
		map.put("id", String.valueOf(id));
		map.put("address", address);
		map.put("longitude", longitude);
		map.put("latitude", latitude);
		map.put("XY",longitude+","+latitude);
		return map;
	}

	@Override
	public String toString() {
		return "branch:"+id+" "+name+" "+address;
	}
	
	
}
